﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MDS;
using System.Net;

namespace MDSLauncher
{
    class Program
    {
        static void Main(string[] args)
        {
            //MDS.MDSServer mds = new MDS.MDSServer();
            //mds.Start();

            SFITProxyConfig config = new SFITProxyConfig(IPAddress.Parse("127.0.0.1"),8888); // TODO: Initialize to an appropriate value
            SFITProxy target = new SFITProxy(config); // TODO: Initialize to an appropriate value
            target.Start();
            target.OnMessageReceived += new SFITMessageHandler(target_OnMessageReceived);
            while (true)
            {
                string input = Console.ReadLine();
                if (input == "stop")
                    target.Stop();
                else if (input == "start")
                    target.Start();
            }
        }

        static void target_OnMessageReceived(SFITRecord message)
        {
            Console.WriteLine(message.StkId);
        }
    }
}
